import os
here = lambda x: os.path.join(os.path.abspath(os.path.dirname(__file__)), x)

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = ( ('Django Admin', 'djangoadmin@mlke.net'),)

MANAGERS = ADMINS

DATABASE_ENGINE = 'postgresql_psycopg2'
DATABASE_NAME = 'TEMPROJECT'
DATABASE_USER = 'DBUSER'
DATABASE_PASSWORD = 'DBPASSWD'
DATABASE_HOST = '192.168.2.4'
DATABASE_PORT = '' 

TIME_ZONE = 'Europe/Sofia'

LANGUAGE_CODE = 'bg'

SITE_ID = 1

USE_I18N = True

MEDIA_ROOT = here('../media/')

MEDIA_URL = '/media/'

ADMIN_MEDIA_PREFIX = '/admin_media/'

# Make this unique, and don't share it with anybody.
SECRET_KEY = 'SECRETKEY'

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.load_template_source',
    'django.template.loaders.app_directories.load_template_source',
#     'django.template.loaders.eggs.load_template_source',
)

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.middleware.doc.XViewMiddleware',
	'a115.middleware.ThreadLocals.ThreadLocals',
	'pagination.middleware.PaginationMiddleware',
)

TEMPLATE_CONTEXT_PROCESSORS = (
	'django.core.context_processors.auth',
	'django.core.context_processors.debug',
	'django.core.context_processors.i18n',
	'django.core.context_processors.media',
	'django.core.context_processors.request',
	# Add yours here
)

ROOT_URLCONF = 'TEMPROJECT.urls'

TEMPLATE_DIRS = (
	here('../templates/'),
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
	'django.contrib.admin',
	'django_extensions',
	'perfect404',
	'pagination',
	'registration',
	'contact_form',
	'a115',
	'TEMPROJECT.frontend',
)

CACHE_BACKEND = 'memcached://192.168.2.5:11211/'
CACHE_TIMEOUT = 60*120
CACHE_PREFIX = "TEMPROJECT".upper()
CACHE_MIDDLEWARE_SECONDS = CACHE_TIMEOUT
CACHE_MIDDLEWARE_KEY_PREFIX = CACHE_PREFIX

SERVER_EMAIL = 'TEMPROJECT <djangoadmin@mlke.net>'
DEFAULT_FROM_EMAIL = 'TEMPROJECT <djangoadmin@mlke.net>'
EMAIL_HOST = '69.64.92.150'

SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
ACCOUNT_ACTIVATION_DAYS = 7

LOGIN_REDIRECT_URL = '/' # Default is /accounts/profile
